/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.DesignPatterns.structural.Composite;

/**
 *
 * @author Nashief
 */
public class Leaf implements Component {
 
    String name;

    public Leaf(String name) {
        this.name = name;
    }

    public Leaf() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    
    
    
    @Override
    public void sayHello() {
    System.out.println(name+"leaf says hello");;
    }

    @Override
    public void sayGoodBye() {
        System.out.println(name+"leaf says goodbye");
    }
    
}
